﻿using System.Collections.Generic;
using System.Linq;

namespace Tuxedo.Compile
{
	internal class PropertyBody
	{
		public bool IsGetter { get; private set; }
		public CodeLine[] Code { get; private set; }
		public bool IsImplicit { get; private set; }
		public Visibility Visibility { get; private set; }

		public PropertyBody(bool isGetter, IList<CodeLine> code, Visibility visibility)
		{
			this.IsGetter = isGetter;
			this.IsImplicit = code == null;
			this.Code = code != null ? code.ToArray() : null;
			this.Visibility = visibility;
		}
	}
}
